<template>
  <view class="manage feat-grid">


    <view v-for="(item,index) in 2" class="script-item script-item-small">

      <view @click="handleJump(item)" class="script-item-box fx-row-b">
        <view class="script-item-box-img main-bg"
              :style="{'background-image': 'url('+ item.script?.cover +')'}"
        >
        </view>

        <view class="script-item-box-content fx-col-b">
          <view class="script-item-box-content-title fx-row-s">
            <view class="title-name com-overflow">{{ item.script?.title }}</view>
          </view>
          <view class="script-item-box-content-author fx-row-b">
            <view class="fx-row-s" style="align-items: end;">
              <view class="script-item-box-content-author-text"> 开本时间：1900002423</view>
            </view>
          </view>
          <view class="script-item-box-content-author fx-row-b">
            <view class="fx-row-s" style="align-items: end;">
              <view class="script-item-box-content-author-text"> 结束时间：19042342342423423423</view>
            </view>
          </view>
        </view>

      </view>

    </view>

    <view class="mt50" v-if="renderData.testList?.length<=0">
      <noData text="暂未有相关记录"></noData>
    </view>


    <uv-toast ref="loginToast"></uv-toast>
    <toast></toast>

  </view>

</template>


<script setup>
import { reactive, ref,computed} from "vue";
import { ossImage,jump } from '@/utils/index'
import { header,color } from '@/enums/constants';
import { onLoad,onReachBottom } from "@dcloudio/uni-app";
import loginApi from "@/apis/login";
import comPerson from './comPerson'
import noData from '@/components/com-nodata';
import { userStore } from "@/stores";
import qs from "qs";

const store = userStore();
const loginToast = ref(null);

const renderData = {
  testList:[],
  isDisplayPerson:true,
  list:[
    {
      script:{
        cover:'https://tcs.teambition.net/thumbnail/112x551aad230e75f65a0ac07ea44a2ca1ef/w/200/h/200',
        title:'你好',
        user:{nickname:'www'}
      }
    }
  ],

}

const isReadyLogin=()=>{
  let text = ['请您勾用户选协议','请您输入电话号码','请您输入验证码'];
  let index = undefined;
  if(!isChecked.value){
    index = 0;
  }
  if(!formData.phone){
    index = 1;
  }
  if(!formData.code){
    index = 2;
  }
  if(index === undefined){
    return true;
  }else{
    loginToast.value.show({
      title:text[index],
      type:'warning',
      position:'top'
    })
  }
}

onLoad(()=>{
  //测试列表
  //handleGetTestList();
});

onReachBottom(()=>{
  if(renderData.testList.length<8){return}
  handleGetTestList('scroll');
})

</script>

<style lang="scss" scoped>
.manage {
  @include main-text3;
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  padding-bottom:80rpx;

  background-color: $main-text-e;
  .script-item{
    margin-bottom: 20rpx;
  }
  .script-item-box{
    &-img{
      width: 80rpx;
      height: 80rpx;
    }

    .script-item-box-content-author-text{
      max-width: initial;
    }

  }


}

</style>
